{layout name="/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>营地管理 <small>营地星级</small></h1>
        <ol class="breadcrumb">
          <li><a href="/index"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/grades"><i class="fa fa-dashboard"></i> 营地星级列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 修改营地星级</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          请设置营地星级信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <form class="form-horizontal" role="form" action="{:url('/grades/'.$info->id)}" method="post">
    	<input type="hidden" id='method' name="_method" value="PUT">
      <h4>编辑营地星级</h4>
      <div class="form-group">
        <label class="control-label col-sm-3">星级名称</label>
        <div class="col-sm-9">
        <input class="form-control" type="text" name="name" value="{$info->name}" placeholder="请正确填写类型名称">
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-3">星级描述</label>
        <div class="col-sm-9">
        <input class="form-control" type="text" name="profiles"  value="{$info->profiles}" placeholder="请对营地简单描述">
        </div>
      </div>
      <div class="modal-footer">
        <a href="/grades" class="btn btn-default">返回</a>
        <button type="submit" class="btn btn-primary">提交</button>
         <a href="javaScript:;" id='delete' class="btn btn-danger">删除</a>
      </div>
    </form>
    <form id="form" action="{:url('/grades/'.$info->id)}" method="post">
			<input type="hidden" name="_method" value="DELETE" >
		</form>
  </div><!-- /#page-wrapper -->
<script type="text/javascript">
	$('#delete').click(function(){
		if(confirm('确定删除吗')){
			$('#form').submit();
		}
	})
</script>


